<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<div class="row">
	<div class="col-xs-12">
		<div class="box">
			<div class="box-header">
				<div class="box-name">
					<i class="fa fa-usd"></i> <span>员工列表</span>
				</div>
				<div class="box-icons">
					<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
					</a> <a class="expand-link"> <i class="fa fa-expand"></i>
					</a> <a class="close-link"> <i class="fa fa-times"></i>
					</a>
				</div>
				<div class="no-move"></div>
			</div>
			<div class="box-content no-padding">
				<table
					class="table table-bordered table-striped table-hover table-heading table-datatable"
					id="datatable-1">
					<thead>
						<tr>
							<th>员工编号</th>
							<th>姓名</th>
							<th>性别</th>
							<th>所属部门</th>
							<th>职位</th>
							<th>状态</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
						<!-- Start: list_row -->
						<c:forEach var="employee" items="${employee}">
						<tr>
							<td>${employee.nr}</td>
							<td><img class="img-rounded"
								src="http://i.forbesimg.com/media/lists/people/carlos-slim-helu_50x50.jpg"
								alt="">${employee.name}</td>
							<td><c:if test="${employee.gender==1}">男</c:if>
								<c:if test="${employee.gender==0}">女</c:if>
							</td>
							<td>${employee.departmentName}</td>
							<td>${employee.roleName}</td>
							<td>
							<c:if test="${employee.status==1}">可用</c:if>
							<c:if test="${employee.status==0}">禁用</c:if>
							</td>						
						<td><a href="employeeEdit?id=${employee.id}" class="btn btn-default">编辑资料</a></td>
						</tr>
						</c:forEach>
						
						<!-- End: list_row -->
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
// Run Datables plugin and create 3 variants of settings
function AllTables(){
	TestTable1();
	TestTable2();
	TestTable3();
	LoadSelect2Script(MakeSelect2);
}
function MakeSelect2(){
	$('select').select2();
	$('.dataTables_filter').each(function(){
		$(this).find('label input[type=text]').attr('placeholder', 'Search');
	});
}
$(document).ready(function() {
	// Load Datatables and run plugin on tables 
	LoadDataTablesScripts(AllTables);
	// Add Drag-n-Drop feature
	WinMove();
});
</script>